Page({
    data:{
        title:"几个薛之谦",
        time:"2012-08-15",
        singer:"薛之谦",
        url:"http://p2.music.126.net/RNhUsPEUjM2ymbQ_wWJ0-Q==/109951165625482130.jpg?param=177y177",
        list:[
            {
                id:169137,
                videoSrc:"http://link.hhtjim.com/163/169137.mp3",
                songname:"我知道你都知道",
                name:"薛之谦",
            },
            {
                id:169140,
                videoSrc:"http://link.hhtjim.com/163/169140.mp3",
                songname:"几个你",
                name:"薛之谦",
            },
            {
                id:169142,
                videoSrc:"http://link.hhtjim.com/163/169142.mp3",
                songname:"伏笔",
                name:"薛之谦",
            },
            {
                id:33071051,
                videoSrc:"http://link.hhtjim.com/163/33071051.mp3",
                songname:"为什么",
                name:"薛之谦",
            },
            {
                id:169144,
                videoSrc:"http://link.hhtjim.com/163/169144.mp3",
                songname:"我终于成了别人的女人",
                name:"薛之谦",
            },
            {
                id:33071052,
                videoSrc:"http://link.hhtjim.com/163/33071052.mp3",
                songname:"敷衍",
                name:"薛之谦",
            },
            {
                id:169146,
                videoSrc:"http://link.hhtjim.com/163/169146.mp3",
                songname:"我们爱过就好",
                name:"薛之谦 / 黄龄",
            },
            {
                id:33071050,
                videoSrc:"http://link.hhtjim.com/163/33071050.mp3",
                songname:"楚河汉界",
                name:"薛之谦",
            },
            {
                id:33071053,
                videoSrc:"http://link.hhtjim.com/163/33071053.mp3",
                songname:"为了遇见你",
                name:"薛之谦",
            },
        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        const { id, videoSrc,songname,name } = item; // 从数据项中解构出
        const { list,url }=this.data
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&videoSrc=${encodeURIComponent(videoSrc)}&songname=${songname}&name=${name}&url=${encodeURIComponent(url)}&list=${encodeURIComponent(JSON.stringify(list))}`,
          });
    }
})